#-------------------------------------------------
#
# Project created by QtCreator 2012-04-06T00:54:16
#
#-------------------------------------------------

QT += core
QT -= gui

TARGET = qar
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

QMAKE_CFLAGS += -std=gnu99 -fno-strict-overflow -fno-strict-aliasing -Wno-unused-local-typedefs -gdwarf-2
QMAKE_CXXFLAGS += -std=c++11 -fno-strict-overflow -fno-strict-aliasing -Wno-unused-local-typedefs -gdwarf-2
QMAKE_LFLAGS += -flto -fno-strict-overflow -fno-strict-aliasing

QMAKE_CFLAGS += -fstack-protector-all --param ssp-buffer-size=4
QMAKE_CXXFLAGS += -fstack-protector-all --param ssp-buffer-size=4
QMAKE_LFLAGS += -fstack-protector-all --param ssp-buffer-size=4

QMAKE_CFLAGS += -Wl,-z,relro,-z,now
QMAKE_CXXFLAGS += -Wl,-z,relro,-z,now
QMAKE_LFLAGS += -Wl,-z,relro,-z,now

SOURCES += main.cpp \
    util.cpp \
    store.cpp \
    extract.cpp \
    crypto/encrypteddevice.cpp \
    crypto/hasher.cpp \
    crypto/cipher.cpp \
    crypto/authenticator.cpp \
    crypto/counter.cpp \
    crypto/ciphers/encryptor.cpp \
    crypto/auth/signer.cpp \
    crypto/hash/hashfunction.cpp \
    crypto/hash/hashfunctionmd5.cpp \
    crypto/hash/hashfunctionnull.cpp \
    crypto/hash/hashfunctionsha1.cpp \
    crypto/ciphers/encryptornull.cpp \
    crypto/auth/signernull.cpp \
    crypto/ciphers/encryptoraes.cpp \
    crypto/ciphers/aes.c \
    crypto/ciphers/common.c \
    crypto/ciphers/salsa20.cpp \
    crypto/ciphers/encryptorsalsa20.cpp

installfiles.files += $$TARGET
installfiles.path = /usr/bin
INSTALLS += installfiles

HEADERS += \
    outputstream.h \
    util.h \
    store.h \
    extract.h \
    crypto/encrypteddevice.h \
    crypto/hasher.h \
    crypto/cipher.h \
    crypto/authenticator.h \
    crypto/counter.h \
    crypto/ciphers/encryptor.h \
    crypto/auth/signer.h \
    crypto/hash/hashfunction.h \
    crypto/hash/hashfunctionmd5.h \
    crypto/hash/hashfunctionnull.h \
    crypto/hash/hashfunctionsha1.h \
    crypto/ciphers/encryptornull.h \
    crypto/auth/signernull.h \
    crypto/ciphers/encryptoraes.h \
    crypto/ciphers/aes.h \
    crypto/ciphers/common.h \
    crypto/ciphers/salsa20.h \
    crypto/ciphers/encryptorsalsa20.h

QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp

#QMAKE_CXXFLAGS += -O0 -g -fsanitize=address
#QMAKE_LFLAGS += -O0 -g -fsanitize=address
